package com.uum.admin.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.uum.common.core.base.BaseEntity;
import com.uum.common.core.valid.InsertGroup;
import com.uum.common.core.valid.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 字典数据表
 * </p>
 *
 * @author Tsang_yc
 * @since 2022-01-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="SysDictItem对象", description="字典数据表")
@JsonInclude(value = JsonInclude.Include.NON_EMPTY)
public class SysDictItem extends BaseEntity {


    @NotEmpty(message = "主键不能为空",groups = {UpdateGroup.class})
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @NotEmpty(message = "字典编码",groups = {InsertGroup.class})
    @ApiModelProperty(value = "字典项名称")
    private String name;

    @NotEmpty(message = "字典编码",groups = {InsertGroup.class})
    @ApiModelProperty(value = "字典项值")
    private String value;

    @NotEmpty(message = "字典编码",groups = {InsertGroup.class})
    @ApiModelProperty(value = "字典编码")
    private String dictCode;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "状态（0 停用 1正常）")
    private Integer status;

    @ApiModelProperty(value = "是否默认（0否 1是）")
    private Boolean defaulted;

    @ApiModelProperty(value = "备注")
    private String remark;

}
